package reflection;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-04-12
 * Time:13:04
 */
public class Cat {
    String name;
    public int age;
    public int step;
    private String id;

    public Cat() {
    }

    public Cat(String name) {
        this.name = name;
    }

    public Cat(int age) {
        this.age = age;
    }

    public Cat(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void eat() {
        System.out.println("eat fish");
    }

    public void move() {
        step++;
    }

    @Override
    public String toString() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", step=" + step +
                ", id='" + id + '\'' +
                '}';
    }
}
